Once you get things going, you'll find yourself in control of a small triangular ship, dodging big rocks. Your controls are:
If you prefer, you may control your ship with the mouse. The controls here are:
Big rocks are worth 50 points. Medium rocks are worth 100 points. Small rocks are worth 200 points.
You have three ships. You get a free ship every 10,000 points.
As with all standard X applications, roids may be customized through entries in the resource manager. This almost always means editing your .Xdefaults file. [Note: the entry names must be entered in either all lower-case, or in the exact case shown below.]
If you wish to set up your own interpretation of the mouse and keyboard, the following actions are provided:
It is beyond the scope of this document to describe how to use these actions in your .Xdefaults file to change the keyboard and mouse interpretation. As an example, though, here is what you would use to get the default behavior:
Roids*Roids*translation: \n\
<Btn1Down>: grab-focus() rotate-to-point()\n\
Button1<PtrMoved>: rotate-moved()\n\
<Btn1Up>: stop-rotate()\n\
<Btn2Down>: thrust-on()\n\
<Btn2Up>: thrust-off()\n\
<Btn3Down>: fire()\n\
<KeyDown>z: rotate-left()\n\
<KeyUp>z: rotate-off()\n\
<KeyDown>x: rotate-right()\n\
<KeyUp>x: rotate-off()\n\
<KeyDown>\\,: thrust-on()\n\
<KeyUp>\\,: thrust-off()\n\
<KeyDown>.: fire()\n\
Shift<KeyDown>q: quit()
I've always wanted to write one of these games. Unfortunately, I don't enjoy optimizing code to be very fast, and that's what has always been necessary for good arcade games on every machine I've used.
Until I got my DECstation 3100. This machine is fast enough that I didn't have to write efficient code. Roids does stupid things like repainting the ships location 100 times a second, and it doesn't matter.
Thus, I have written a game that (probably unnecessarily) requires a very fast workstation. Please don't interpret this as snobbishness on my part ("your workstation isn't as fast as mine so you can't play my game, nyah nyah"); it is just laziness.
There are lots more resources. The ones above are the only ones I want documented; the rest change the behavior of the game. The curious should look at the source.
The mouse controls are, in my opinion, useless. I'd be very interested if anyone actually likes them. (I implemented them for a friend who refuses to use his keyboard to play games.)
Collision detection is very good. I actually check to see if things touch; I refused to use the standard method of just seeing if the centers of objects are close. Of course, this is a large part of why roids needs a fast workstation.
Roids works only on very fast workstations. Don't try and play it over a network; it won't work.
The rocks look really stupid. Anyone have some good rock designs?
You shouldn't have to re-run the program to play another game.
There should be high-score mechanisms.
Doesn't handle different visuals like a good X client should. In particular, if you play this on a display with a StaticGrey visual, you will probably not be able to see anything.
The default colors don't show up well on all displays.
No enemy ships. In a way, this is a feature; I always despised the fact that people could get lots of points in the original Asteroids by leaving one tiny little rock and blasting all the enemy ships.
The code really could be a lot more efficient, and therefore work well over a larger variety of machines.
Copyright 1989 Digital Equipment Corporation
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital Equipment Corporation not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Digital Equipment Corporation makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Terry Weissman
Western Software Laboratory
Digital Equipment Corporation
weissman@wsl.dec.com